/**
 * Copyright 2015-2016 com.eyaomall
 * All rights reserved.
 *
 * @project
 * @author pro
 * @version 1.0
 * @date 2016-03-07
 */
package com.eyaomall.wxmall.dao;

import org.springframework.stereotype.Repository;

import com.eyaomall.wxmall.model.po.OrderGoods;
import com.lycheeframework.core.annotation.NameSpace;
import com.lycheeframework.core.cmp.kit.IHTTPObject;
import com.lycheeframework.core.cmp.kit.Pages;
import com.lycheeframework.core.support.DaoSupport;
@Repository
@NameSpace("order_goods")
public class OrderGoodsDao extends DaoSupport<OrderGoods> {

	/**
	 * 新增订单产品信息
	 * @param orderGoods
	 * @return
	 */
	public Integer create(OrderGoods orderGoods){
		super.insert(orderGoods);
		
		return orderGoods.getId();
	}
	
	/**
	 * 分页查询订单产品信息
	 * @param orderId
	 * @param httpObject
	 * @return
	 */
	public Pages<?> pages(Integer orderId,IHTTPObject httpObject){
		OrderGoods goods = new OrderGoods();
		goods.setOrderId(orderId);
		
		return super.page(goods, httpObject);
	}
}
